package com.care.system.server.service.impl;

import java.util.List;

import com.care.system.common.request.RecordRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.care.system.server.mapper.TRecordMapper;
import com.care.system.common.domain.TRecord;
import com.care.system.server.service.ITRecordService;

/**
 * 钱包明细Service业务层处理
 *
 * @author 李光耀负责
 * @date 2024-03-25
 */
@Service
public class TRecordServiceImpl implements ITRecordService
{
    @Autowired
    private TRecordMapper tRecordMapper;

    /**
     * 查询钱包明细
     *
     * @param recordId 钱包明细主键
     * @return 钱包明细
     */
    @Override
    public TRecord selectTRecordByRecordId(Long recordId)
    {
        return tRecordMapper.selectTRecordByRecordId(recordId);
    }

    /**
     * 查询钱包明细列表
     *
     * @param tRecord 钱包明细
     * @return 钱包明细
     */
    @Override
    public List<TRecord> selectTRecordList(TRecord tRecord)
    {
        return tRecordMapper.selectTRecordList(tRecord);
    }

    /**
     * 新增钱包明细
     *
     * @param tRecord 钱包明细
     * @return 结果
     */
    @Override
    public int insertTRecord(TRecord tRecord)
    {
        return tRecordMapper.insertTRecord(tRecord);
    }

    /**
     * 修改钱包明细
     *
     * @param tRecord 钱包明细
     * @return 结果
     */
    @Override
    public int updateTRecord(TRecord tRecord)
    {
        return tRecordMapper.updateTRecord(tRecord);
    }

    /**
     * 批量删除钱包明细
     *
     * @param recordIds 需要删除的钱包明细主键
     * @return 结果
     */
    @Override
    public int deleteTRecordByRecordIds(Long[] recordIds)
    {
        return tRecordMapper.deleteTRecordByRecordIds(recordIds);
    }

    /**
     * 删除钱包明细信息
     *
     * @param recordId 钱包明细主键
     * @return 结果
     */
    @Override
    public int deleteTRecordByRecordId(Long recordId)
    {
        return tRecordMapper.deleteTRecordByRecordId(recordId);
    }

    @Override
    public List<TRecord> selectRecordList(RecordRequest recordRequest) {
        return tRecordMapper.selectRecordList(recordRequest);
    }

}
